<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>首页</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-1.10.1.min.js"></script>
    <script src="js/swiper.min.js"></script>
    <link rel="stylesheet" href="css/swiper.min.css">
    <script src="js/layer.js"></script>
    <link rel="stylesheet" href="css/layer.css">
</head>
<body>
<div class="banner">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><img src="images/banner4.jpg" alt=""></div>
            <div class="swiper-slide"><img src="images/banner4.jpg" alt=""></div>
            <div class="swiper-slide"><img src="images/banner4.jpg" alt=""></div>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>
</div>
<div class="list">
<ul>
    <li class="renChou"><a href="recognize.html" ><img src="images/renchou.png" alt=""><p>认筹</p></a></li>
    <li class="daikaifa"><a href="../personal/wodetuijianma.html"><img src="images/tuiguang.png" alt=""><p>推广</p></a></li>   
    <li class="daikaifa"><a href="##"><img src="images/qiandao.png" alt=""><p>签到</p></a></li>
    <li class="daikaifa"><a href="##"><img src="images/kuangji.png" alt=""><p>矿机</p></a></li>
    <li ><a href="../personal/zhanghuchongzhi.html"><img src="images/qianbao.png" alt=""><p>充值</p></a></li>
    <li><a href="information.html?param=1"><img src="images/zixun.png" alt=""><p>资讯</p></a></li>

</ul>
</div>
<div class="notice">
    <div class="notice-list">
        <a href="notice.html?param=1"><img src="images/gonggao.png" alt=""></a>
        <span></span>
    </div>
</div>
<div class="activity">
    <img src="images/tu.jpg" alt="">
    <img src="images/tu1.png" alt="">
</div>
<div class="activity-none"></div>
<div class="footer-nav">
<ul>
    <li>
        <a href="index.html">
            <img src="images/zhuye.png" alt=""><p>首页</p>
        </a>
    </li>
    <li class="daikaifa"><a href="###"><img src="images/jiaoyi.png" alt=""><p>交易</p></a></li>
    <li ><a href="notice.html"><img src="images/guanggao.png" alt=""><p>公告</p></a></li>

    <li><a href="../personal/index.html"><img src="images/geren.png" alt=""><p>个人中心</p></a></li>
</ul>

</div>
<div class="pop">
    <button>开始认筹</button>
    <div class="close1"></div>
</div>
<div class="mask">

</div>
<script>

    $(function(){
        $(".daikaifa").click(function () {
            layer.msg("待启用")
        });

        $.ajax({
            url: `${localStorage.top}api/index/notice_list?TOKEN=${localStorage.token}` ,    //请求的url地址
            dataType: "json",   //返回格式为json
            async: true,//请求是否异步，默认为异步，这也是ajax重要特性
            type: "GET",   //请求方式
            success: function (data) {
                console.log(data);
                console.log(data.data[0].title);

                $(".notice span").html(`<a>
                    `+data.data[0].title+`
                    </a>`);


                $(".notice span a").click(function () {
                    localStorage.id=data.data[0].article_id;
                    window.location.href='notice-details.html';
                    localStorage.uid=0;
                })
            }
        })

    });

    var mySwiper = new Swiper('.swiper-container',{
        loop: true,
        speed:600,
        grabCursor : true,
        parallax:true,
        autoplay:{
            delay: 3000,
        },
        pagination: {
            el:'.swiper-pagination',
            clickable :true,
        },
    });

    $('.pop').hide();
    $('.mask').hide();

    // $(document).ready(function(){
    //     showBg();
    // });
    $('.close1').click(function(){
         hideBg();
    });
    $('.pop button').click(function(){
        // window.location.href('recognize.html')
        window.location.href="recognize.html";
    });
    function hideBg(){
        $('.mask').hide();
        $('.pop').fadeOut();
    }
    function showBg(){
        $('.mask').show();
        $('.pop').fadeIn();
    }
    setTimeout('hideBg()',5000);
    // localStorage.tan=1
    localStorage.tt=1;
   console.log(localStorage.tan);
    if(localStorage.tan===localStorage.tt){
        // alert(111)
        showBg();
        localStorage.tan=0;
        console.log(localStorage.tan);
    }

</script>
</body>
</html>